package yq.test.demo.Book.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yq.test.demo.Book.domain.Books;
import yq.test.demo.Book.mapper.BookMapper;
import yq.test.demo.Book.service.BookService;


import java.util.List;

@Service
public class BookServiceImlp implements BookService {
    @Autowired
    private BookMapper bookMapper;
    @Override
    public List<Books> findAll() {
        return bookMapper.findAll();
    }

    @Override
    public int deleteById(int id) {
        return bookMapper.deleteById(id);
    }

    @Override
    public int update(Books books) {
        return bookMapper.update(books);
    }

    @Override
    public Books get(int id) {
        return bookMapper.get(id);
    }

    @Override
    public int add(Books books) {
        return bookMapper.add(books);
    }

    @Override
    public List<Books> findByBooks(String book) {
        return bookMapper.findByBooks(book);
    }
}
